layui.use(['table'], function () {
    var table = layui.table;

    /**
     * 物联卡综合信息-物联卡可变更资费
     */
    var GeneralOrderedCharges = {
        tableId: "generalChangeChargesTable",    //表格id
    };

    /**
     * 初始化表格的列
     */
    GeneralOrderedCharges.initColumn = function () {
        return [[
            {field: 'number', align: "center", title: '序号',type:'numbers',width: 60},
            {field: 'offeringId', align: "center", title: '资费ID'},
            {field: 'offeringName', align: "center",  title: '资费名称'},
            {field: 'offeringTypeName', align: "center",  title: '资费分类'},
            {field: 'paymentModeName', align: "center", title: '付费模式'},
            {field: 'effectiveDate', align: "center", title: '资费生效时间'},
            {field: 'expiriedDate', align: "center", title: '资费失效时间'},
            {field: 'description', align: "center", title: '资费描述'}
        ]];
    };

    // 渲染表格
    table.render({
        elem: '#' + GeneralOrderedCharges.tableId,
        defaultToolbar: [],
        url: Feng.ctxPath + '/general/changeableCharges?accountId=' + $("#accountId").val() + '&cardType=' + $("#cardType").val()+ '&cardNum=' + $("#cardNum").val() + '&offeringId=' + $("#offeringId").val(),
        height: "full-98",
        cellMinWidth: 100,
        page: {
            prev: "上一页",
            next: "下一页",
            layout: ['prev', 'next'],
            limit: 10
        },
        cols: GeneralOrderedCharges.initColumn(),
    });
});